1. Field of the Invention
The present invention relates to a block distortion reduction apparatus for reducing block distortion in blocking and encoding input data such as still image data and moving picture data.
2. Description of the Related Art
Block encoding such as Discrete Cosign Transform (DCT) encoding has been known as a method for effectively compressing and encoding still image data, moving picture data, etc. As an example of block encoding systems of image data, there can be mentioned the MPEG (Moving Picture Experts Group) combining DCT utilizing correlation in a frame, motion compensation utilizing correlation between frames, and Huffman encoding utilizing correlation of code strings.
In compressing or expanding image data etc. by such block encoding, block distortion (block noise) sometimes occurs. Distortion occurs easier as the compression ratio increases. That is, since DCT encoding etc. are performed in a closed space inside a block without considering correlation across block boundaries, the continuity of the data at block boundaries cannot be kept and therefore deviations in reproduced data values at boundaries with adjoining blocks are perceived as noise. This block distortion has a certain regularity, so is perceived more easily compared with general random noise and therefore is a major factor degrading image quality.
In order to reduce this block distortion, Japanese re-publication of PCT international WO98/54892 discloses a technique comprising detecting a parameter indicating difficulty of encoding from input image data, calculating a parameter required for judgment of block distortion from the input data, evaluating the block distortion based on the result of detection of the parameter indicating difficulty of encoding and the result of calculation of the above parameter, calculating a correction value to reduce the block distortion, and correcting the input data by the correction value in accordance with the result of evaluation of the block distortion.
However, according to the method for calculating parameters required for evaluation of the block distortion from input data disclosed in the above publication, when macroblocks (MB) are arranged as shown in FIG. 11, a DCT coefficient and a differential motion vector are calculated for the macroblock MB0 for parameter calculation by the following equation:MB0=(MB0+MB1+MB2+MB3+MB4+MB5+MB6+MB7+MB8)/9
That is, in order to calculate the DCT coefficient and the differential motion vector DMV for the macroblock MB0, the adjoining macroblocks MB1 to MB8 are also considered. Therefore, the DCT coefficients and the differential motion vectors DMV of nine macroblocks in total are required to be buffered. Therefore, there is a disadvantage that the size of the circuit for the block distortion reduction becomes large.
Further, in an MPEG decoder, different numbers of differential motion vectors are output depending on the codec mode, picture structure, predictive type, and macroblock mode. However, no block distortion reduction apparatus handling such a variety of encoding modes has even been proposed. Therefore, a block distortion reduction apparatus not based on the encoding mode has been demanded.